<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>IDIS 工作室 | 修改简介</title>


    <link href="../css/bootstrap.min.css" rel="stylesheet">
    <link href="../css/style.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="../DataTables/media/css/jquery.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="../DataTables/media/css/dataTables.editor.css">
    <link rel="stylesheet" type="text/css" href="../DataTables/media/css/select.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="../DataTables/media/css/buttons.dataTables.min.css">
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<body>
<!-- 引入导航 -->
<link rel="import" href="../../templates/nav.html"/>
<!--内容-->
<div class="container" id="page-wrapper">
    <div class="row">
        <div class=".col-md-6 .col-md-offset-3">
            <h3 class="backstage_title">修改简介管理页面</h3>
            <form class="form-horizontal backstage_form">
                <div class="panel-body">
                    <table width="100%" class="table display table-striped table-bordered table-hover" cellspacing="0" id="list">
                        <thead>
                        <tr>
                            <th width="100%">简介</th>
                        </tr>
                        </thead>
                        <tbody>
                        </tbody>
                    </table>
                </div>
            </form>
        </div>
    </div>
</div>

<!-- Page-Scripts  -->
<script src="../DataTables/media/js/jquery.js"></script>
<script src="../js/bootstrap.min.js"></script>
<!-- editor-Scripts  -->
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/select/1.2.5/js/dataTables.select.min.js"></script>
<script src="../DataTables/media/js/dataTables.editor.min.js"></script>
<!-- Page-Scripts  -->
<script>
    var editor; // use a global for the submit and return data rendering in the examples

    $(document).ready(function() {
        editor = new $.fn.dataTable.Editor( {
            i18n : {
                edit : {
                    title : "修改简介",
                    submit : "修改"
                }
            },
            ajax: "../php/upload.php",
            table: "#list",
            fields: [{
                label: "简介:",
                name: "content"
            }
            ]
        });

        var table = $('#list').DataTable({   //此处list与页面table的id相同
            dom: "Bfrtip",
            ajax: 'localhost:8882/admin/intro/all', //加载数据接口
            columns: [
                {data: "content"}
            ],
            select: true,
            buttons: [
                { extend: "edit",   editor: editor ,text:'修改'}
            ]
        });
    });
</script>
</body>
</html>